﻿using System;

namespace Storyteller.Framework.Graphics.Particles.EmitModifiers
{
	public class RandomScaleEmitModifier : ParticleEmitModifier
	{
		public float MinimumScale { get; set; }
		public float MaximumScale { get; set; }

		public RandomScaleEmitModifier()
		{
			random = RandomUtil.Random;
		}

		public override void Process(Particle[] particles, int offset, int count)
		{
			for (int i = 0; i < count; i++)
			{
				particles[i + offset].Scale = random.NextFloat(MinimumScale, MaximumScale);
			}
		}

		Random random;
	}
}
